package com.cnswhy.cloud.server.core.dto;

import com.cnswhy.cloud.server.core.entity.ShopProductGallery;
import com.cnswhy.cloud.server.core.entity.ShopProductStock;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 实体类
 * 商品详情表
 * </p>
 *
 * @author cnswhy
 * @since 2020-11-10
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Builder
@ApiModel(value = "ShopProductSaveDTO", description = "商品详情表")
public class ShopProductSaveDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 商户id
     */
    @ApiModelProperty(value = "商户id")
    //@NotNull(message = "商户id不能为空")
    private Long merchantId;
    /**
     * 二级分类id
     */
    @ApiModelProperty(value = "二级分类id")
    @NotNull(message = "二级分类id不能为空")
    private Long classifyId;
    /**
     * 品牌id
     */
    @ApiModelProperty(value = "品牌id")
    @NotNull(message = "品牌id不能为空")
    private Long brandId;
    /**
     * 商品名称
     */
    @ApiModelProperty(value = "商品名称")
    @NotEmpty(message = "商品名称不能为空")
    @Length(max = 255, message = "商品名称长度不能超过255")
    private String productName;
    /**
     * 商品描述，用户分享
     */
    @ApiModelProperty(value = "商品描述，用户分享")
    @Length(max = 255, message = "商品描述，用户分享长度不能超过255")
    private String productRemark;
    /**
     * 缩略图
     */
    @ApiModelProperty(value = "缩略图")
    //@NotEmpty(message = "缩略图不能为空")
    @Length(max = 255, message = "缩略图长度不能超过255")
    private String thumbnailImg;
    /**
     * 1普通商品2虚拟商品
     */
    @ApiModelProperty(value = "1普通商品2虚拟商品")
    @NotNull(message = "1普通商品2虚拟商品不能为空")
    private Integer productType;
    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer sortOrder;
    /**
     * 轮播图列表
     */
    @ApiModelProperty(value = "轮播图列表")
    @Length(max = 1000, message = "轮播图列表长度不能超过1000")
    private String sliderImgs;
    /**
     * 商品海报
     */
    @ApiModelProperty(value = "商品海报")
    @Length(max = 255, message = "商品海报长度不能超过255")
    private String posterImg;
    /**
     * 1销售中2下架3删除4待审核5保存6审核不通过
     */
    @ApiModelProperty(value = "1销售中2下架3删除4待审核5保存6审核不通过")
    private Integer status;
    /**
     * 商品介绍
     */
    @ApiModelProperty(value = "商品介绍")
    @Length(max = 65535, message = "商品介绍长度不能超过65,535")
    private String productDesc;
    /**
     * 产品参数
     */
    @ApiModelProperty(value = "产品参数")
    @Length(max = 65535, message = "产品参数长度不能超过65,535")
    private String productParameter;
    /**
     * 拒绝原因
     */
    @ApiModelProperty(value = "拒绝原因")
    @Length(max = 255, message = "拒绝原因长度不能超过255")
    private String refusedRemark;
    /**
     * 违规下架原因
     */
    @ApiModelProperty(value = "违规下架原因")
    @Length(max = 255, message = "违规下架原因长度不能超过255")
    private String violationStopRemark;
    /**
     * 一级分类id
     */
    @ApiModelProperty(value = "一级分类id")
    @NotNull(message = "一级分类id不能为空")
    private Long classifyParentId;
    /**
     * 运费类型 1-固定运费 2-使用运费模板
     */
    @ApiModelProperty(value = "运费类型 1-固定运费 2-使用运费模板")
    private Integer freightType;
    /**
     * 运费金额
     */
    @ApiModelProperty(value = "运费金额")
    private BigDecimal freightPrice;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @Length(max = 20, message = "创建人长度不能超过20")
    private String creator;
    @ApiModelProperty(value = "")
    private Integer sellNum;
    /**
     * 关联分润ID
     */
    @ApiModelProperty(value = "关联分润ID")
    private Long priceId;
    /**
     * 拼购区1是2否
     */
    @ApiModelProperty(value = "拼购区1是2否")
    private Integer spellArea;
    /**
     * 拼团人数
     */
    @ApiModelProperty(value = "拼团人数")
    private Integer spellPeople;
    @ApiModelProperty(value = "")
    @Length(max = 255, message = "长度不能超过255")
    private String url;

    private String posterUrl;

    @ApiModelProperty(value = "是否拼购券商品0否1是")
    private Integer spellProduct;

    private Boolean flushStock;
    private List<ShopProductStock> shopProductStockList;
    private List<Long> specValueIds;
    private List<ShopProductGallerySaveDTO> shopProductGalleryList;
    //private List<ShopProductStock> shopProductStockList;
}
